<template>
  <div class='app-container'>
    <sheader />
    <main class='main-area'>
      <keep-alive v-if='keepAlive'>
        <router-view></router-view>
      </keep-alive>
      <router-view v-else></router-view>
      <!-- <sfooter /> -->
    </main>
  </div>
</template>
<script>
import sheader from "./views/header/index2.vue";
import sfooter from "./views/footer";
import { useRoute } from "vue-router";
export default {
  name: "App",
  components: {
    sheader,
    sfooter,
  },
  setup () {
    const route = useRoute();
    const keepAlive = route.meta ? (route.meta ? route.meta : false) : false;

    return {
      keepAlive,
    };
  },
};
</script>
<style lang="scss">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
.app-container {
  height: 100%;
  overflow-y: auto;
}
.main-area {
  margin: 0 auto;
  width: 900px;
  background: rgba(255, 255, 255, 0.5);
  /* margin-top: 60px; */
  padding: 60px 20px 20px 20px;
  min-height: 100%;
  box-sizing: border-box;
}
</style>
